home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Arsenal Files 8
/
The Arsenal Files Collection #8 (Arsenal Computer) (1996).ISO
/
pcboard
/
iemsi120.zip
/
LOGON.PPS
< prev
next >
Wrap
Text File
|
1996-11-10
|
6KB
|
187 lines
;-----------------------------------------------------------PowerPPL v2.1----
; File : LOGON.PPS
; Original by : PAUL MILLER on 10/17/1996 at 19:37:20
; Last update by : PAUL MILLER on 10/19/1996 at 11:12:06
;----------------------------------------------------------------------------
;TAB_SETTING=2
;VERSION=1.00
; ***************************************************************************
; *** NOTE! This source code is NOT commented! (under my standards) ***
; ***************************************************************************
; this file is an example logon prompt (#259 replacement) for use with
; IEMSI Auto-Logon v1.00
; adjusts user settings to what is specified in ICI packet
Declare Procedure Settings()
Begin
; declare variables
BigStr Client_Packet ; entire EMSI_ICI data packet
String ICI_Name ; name of client (case insensitive)
String ICI_Alias ; name/alias of client (case insensitive)
String ICI_Location ; geographical location of client
String ICI_Data# ; unformatted, full data telephone number
String ICI_Voice# ; unformatted, full voice telephone number
String ICI_Password ; client password (case insensitive)
String ICI_Birthdate ; hexadecimal of birth date (UNIX)
String ICI_CrtDef ; requested terminal emulation protocol
String ICI_Protocol ; preferred file transfer protocol
String ICI_Capabilities ; capabilities of client's software
String ICI_Requests ; client system requests - NEWS, MAIL,
; FILE, HOT, CLR, HUSH, MORE, FSED, XPRS
String ICI_Software ; name, version, serial number of software
String ICI_XLatTabl ; character translation server:client
Integer UserNum ; user/record number of user name
Byte x ; general index/channel variable
; open IEMSI.(node) information file
x = FNext()
FOpen x, "IEMSI."+ToString(PCBNode()), O_RD, S_DN
; if error openning file/does not exist; proceed with regular logon - IEMSI
; file will NOT exist if the user does not support IEMSI
If (FErr(x)) Then
Print ReadLine(PPEPath()+"PRMT259"+LangExt(), 1)
End
EndIf
; read IEMSI information file as default file input channel
FDefIn x
FDGet Client_Packet ; entire EMSI_ICI data packet
FDGet ICI_Name ; name of client (case insensitive)
FDGet ICI_Alias ; name/alias of client (case insensitive)
FDGet ICI_Location ; geographical location of client
FDGet ICI_Data# ; unformatted, full data telephone number
FDGet ICI_Voice# ; unformatted, full voice telephone number
FDGet ICI_Password ; client password (case insensitive)
FDGet ICI_Birthdate ; hexadecimal of birth date (UNIX)
FDGet ICI_CrtDef ; requested terminal emulation protocol
FDGet ICI_Protocol ; preferred file transfer protocol
FDGet ICI_Capabilities ; capabilities of client's software
FDGet ICI_Requests ; client system requests - NEWS, MAIL,
; FILE, HOT, CLR, HUSH, MORE, FSED, XPRS
FDGet ICI_Software ; name, version, serial number of software
FDGet ICI_XLatTabl ; character translation server:client
FClose x
; convert strings to upper case for case insensitive matches
ICI_Name = Upper(ICI_Name)
ICI_Password = Upper(ICI_Password)
ICI_Location = Upper(ICI_Location)
ICI_Requests = Upper(ICI_Requests)
ICI_Protocol = Upper(ICI_Protocol)
; find user record number
UserNum = U_RecNum(Upper(ICI_Name))
; if user name does exist
If (UserNum >= 0) Then
; get user information
GetAltUser UserNum
; matching information between user data base & IEMSI
If (U_PWD = ICI_Password & U_CITY = ICI_Location) Then
Settings()
PutAltUser
KeyFlush
KbdStuff ICI_Name+";"+ICI_Password
; locations do not match, prompt for correct one
ElseIf (U_PWD = ICI_Password)
PrintLn "@X0ETwo different addresses reported:"
PrintLn "@X0F 1 = ",ICI_Location
PrintLn " 2 = ",U_CITY
NewLine
InputStr "Which one is correct (Enter)="+ICI_Location, x, 14, 1, "12", NEWLINE
NewLine
Select Case x
Case 2
; use user location
PrintLn "@X0APlease correct this [IEMSI] information in your terminal program."
Case Else
; use IEMSI location
U_CITY = ICI_Location
PrintLn "@X0ALocation corrected."
End Select
Settings()
PutAltUser
KeyFlush
KbdStuff ICI_Name+";"+ICI_Password
; invalid password
Else
KeyFlush
KbdStuff ICI_Name
EndIf
Else
KeyFlush
KbdStuff ICI_Name
EndIf
End
Procedure Settings()
String str
; if user does supports/specifies this string, process it
If (ICI_Requests <> "") Then
; clear screen setting
If (InStr(ICI_Requests, "CLR")) Then
U_CLS = TRUE
Else
U_CLS = FALSE
EndIf
; full screen editor setting
If (InStr(ICI_Requests, "FSED")) Then
U_FSE = TRUE
U_FSEP = FALSE
Else
U_FSE = FALSE
U_FSEP = TRUE
EndIf
EndIf
; if user does supports/specifies this string, process it
If (ICI_Protocol <> "") Then
; protocol selection
If (InStr(ICI_Protocol, "DZA")) Then
U_TRANS = "Z"
ElseIf (InStr(ICI_Protocol, "ZAP"))
U_TRANS = "Z"
ElseIf (InStr(ICI_Protocol, "ZMO"))
U_TRANS = "Z"
ElseIf (InStr(ICI_Protocol, "SLK"))
U_TRANS = "S"
ElseIf (InStr(ICI_Protocol, "KER"))
U_TRANS = "K"
EndIf
EndIf
; if user does supports/specifies this string, process it
If (ICI_CrtDef <> "") Then
; page length
str = Right(ICI_CrtDef, Len(ICI_CrtDef)-InStr(ICI_CrtDef, ","))
x = Left(str, InStr(str, ",")-1)
EndIf
EndProc